﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using Beetle.Web.Composite;

namespace Beetle.Web.UI.WebControls
{
    public class GridViewExtensionTypeConverter : System.ComponentModel.ExpandableObjectConverter
    {
        public override bool CanConvertFrom(System.ComponentModel.ITypeDescriptorContext context, Type sourceType)
        {
            if (sourceType == typeof(string))
            {
                return false;
            }
            else
            {
                return base.CanConvertFrom(context, sourceType);
            }
        }

        public override bool CanConvertTo(System.ComponentModel.ITypeDescriptorContext context, Type destinationType)
        {
            if (destinationType == typeof(string))
            {
                return true;
            }
            else
            {
                return base.CanConvertTo(context, destinationType);
            }
        }
    }
}
